package com.mflex.flexwi.util;

import android.content.Context;
import android.content.res.Configuration;

/**
 * @ProjectName: PDA
 * @Package: com.mflex.wi.util
 * @ClassName: CommonUtil
 * @Description: java类作用描述
 * @Author: 作者名
 * @CreateDate: 2020/4/8 16:01
 * @UpdateUser: 更新者：
 * @UpdateDate: 2020/4/8 16:01
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class CommonUtil {

    /**
     * 判断是否平板设备
     * @param context
     * @return true:平板,false:手机
     */
    public static boolean isTabletDevice(Context context) {
        return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >=
                Configuration.SCREENLAYOUT_SIZE_LARGE;
    }
}
